#define _CRT_SECURE_NO_WARNINGS 1
class Solution {
public:
    int hammingDistance(int x, int y)
    {
        int ret = x ^ y;
        int sum = 0;
        for (int i = 0; i < 31; i++)
            if ((ret >> i) & 1 == 1) sum++;
        return sum;
    }
};